package org.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.mapper.SysAuthorityMapper;
import org.example.model.SysAuthorityEntity;
import org.example.service.SysAuthorityService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Rommel
 * @version 1.0
 * @date 2023/6/14-18:30
 * @description TODO
 */
@Service
public class SysAuthorityServiceImpl extends ServiceImpl<SysAuthorityMapper, SysAuthorityEntity> implements SysAuthorityService {
    @Override
    public List<SysAuthorityEntity> listByUsername(String username) {
        LambdaQueryWrapper<SysAuthorityEntity> lambdaQueryWrapper = new LambdaQueryWrapper();
        lambdaQueryWrapper.eq(SysAuthorityEntity::getUsername,username);
        return this.list(lambdaQueryWrapper);
    }
}
